import AxiosServe from './request.js'

/* 登录API */
export const RequestLogin = (username, password) => {
    return AxiosServe({
        url: "/api/login",
        method: "post",
        data: {
            username,
            password
        },
        retry: 3, 
        retryDelay: 1000
    })
}

/* 注册 API*/
export const RequestRegistered = (username,password,nick,createtime) =>{
    return AxiosServe({
        url: '/api/register',
        method: 'post',
        data: {
           username,
           password,
           nick,
           createtime
        }
    })
}

/* 退出 */
export const RequestLogout = ()=>{
    return AxiosServe({
        url:'/api/logout',
        method: 'get'
    })
}

/* 动态菜单 */
export const RequestMenu = ()=>{
    return AxiosServe({
        url:'/api/sysmenu',
        method: 'get'
    })
}